#ifndef _FONTOBJ_H
#define _FONTOBJ_H

class  DUI_API FontObj
{
public:
	FontObj();
	~FontObj();
public:
	void  CalcText( HDC hdc, RECT& rc, LPCTSTR lpszText, UINT format = DT_CALCRECT);
	void  DrawText( HDC hdc, RECT& rc, LPCTSTR lpszText, DWORD dwColor = 0, UINT format = DT_SINGLELINE|DT_LEFT|DT_VCENTER, uint8 nFontEffect = 0);
	void  DrawImageText( HDC hdc, RECT& rc, LPCTSTR lpszText, DWORD dwColor = 0, UINT format = DT_SINGLELINE|DT_LEFT|DT_VCENTER, LPCTSTR lpchImgPath = NULL);
	HFONT GetFont();
	LOGFONT& GetLogFont();
	int   GetHeight();
	void  SetId(LPCTSTR lpszId);
	LPCTSTR GetId();
	void  SetFaceName(LPCTSTR lpszFace);
	void  SetFontSize(int nSize);
	void  SetBold(bool bBold);
	void  SetUnderline(bool bUnderline);
	void  SetItalic(bool bItalic);
private:
	LOGFONT m_lfFont;
	HFONT	m_hFont;
	tstring m_strId;
};

#endif // _FONTOBJ_H